
<!--#{set title:'CoolSoft' /}

<div align="center">
<br>
  <a href ="@{Registration.regPage()}"><input type="submit" value="Register" /></a><br></div>
 <div align="center">
 <br>
  <a href="@{Admin.index()}"><input type="submit" value="Log in" /> </a><br></div> -->
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml">
	<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<title>Scrum Cool Tool</title> 
<link rel="stylesheet" href="@{'/public/stylesheets/contentPage.css'}">
<link rel="stylesheet" type="text/css" media="screen" href="/public/stylesheets/jqtransform.css">
<link rel="stylesheet" type="text/css" media="screen" href="/public/stylesheets/impromptu.css">
<link rel="stylesheet" href="/public/stylesheets/colorbox.css" />
<script type="text/javascript" src="/public/javascripts/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/public/javascripts/jquery-impromptu.3.1.min.js"></script>

	
<script type="text/javascript" src="/public/javascripts/jquery.form.js"></script>

<script src="/public/javascripts/jquery.colorbox-min.js">
		</script>
<link rel="stylesheet" type="text/css" href="/public/stylesheets/dailog_box.css" /> 
<script type="text/javascript" src="/public/javascripts/dialog_box.js"></script> 
<script type="text/javascript">
		
			function openprompt(){
			
		var txt = 'Please enter your username:<br /><input type="text" id="alertname" Name="alertName" value="" />';

function mycallbackform(v,m,f){
	 an = m.children('#alertName');
      if(f.alertName == ""){
            an.css("border","solid #ff0000 1px");
            return false;
      }
	  else{
	  	if(v != undefined)
		{
			$.prompt(v +' ' + f.alertName);
		}
	  }
      return true;

      
            
}

$.prompt(txt,{
      submit: mycallbackform,
      buttons: { Ok:'Your password has been sent to' },
	  prefix:'jqismooth'
});
			}
		</script> 
</head>
<link rel="shortcut icon" type="image/png" href="/public/images/scrumTool.png">
<div id="page">
<body>
	
<table border="0">
	<tr >
		<td width="153.5px"></td>
		<td width="282.5px">
			<div id="content">
			<a class="one" href="javascript:showDialog('What\'s This?','Scrum coolTool is a versatile system to operate projects using the Agile scrum technique...Tired of messy description? THIS IS THE TOOL FOR YOU!','prompt');">What's this?</a>
		</div>
		</td>
		<td align="center">
			<img class="borderStyle" src="/public/images/Scrum Cooltool.png" width="400" height="300" />
		</td>
		<td width="332.5px"></td>
		<td width="25.6px">
			<img class="sc" src="/public/images/SC.bmp" width="94" height="117" />
		</td>
	</tr>
</table>

<!--<h2 class="blackBold">
	Username
	<input class="default" type="text" name="username" id="username" size="18" value="" />   Password
	<input type="password" name="password" size="18" value=""/>
</h2>-->
<table border="0" align="center">
	<tr>
		<td>
			<a href="@{Admin.index()}"><input type="submit" value="Log in" />
			<!--<input class="default" type="submit" value="Login" />-->
		</td>
		<td>
			<h5>   Forgot your 
		<!--	<a class="two" href="javascript:openprompt()">password?</a> -->
			<a id="password" href= # >password?</a>
			</h5>
		</td>
	</tr>
</table>
<div align="center">
	<h5 >Don't have an account? <a class="two" href="@{Registration.regPage()}" >Register here.</a>
	</h5> 
</div>
</div>
</body>

<div id = "form"  align = "center">
            <label>
                 Please enter your email
            </label>
            <br>
            <br>
            <input class="validate[required,custom[email]]" name="email" type="text" id = "email" size = "35"/>
            <br>
			<input type="submit" value="Submit" id = "submit" />
</div>

 <script language="javascript">
        $(document).ready(function(){
		$("#form").hide();			
 		$("#password").colorbox({
                 width: "30%",
				inline: true,
                href: "#form",
						onOpen:function(){ $("#form").show(); },
		onCleanup:function(){ $("#form").hide(); },
		});
		  
		
		});
		$('#submit').click(function(){
			var email = $("#email").val();
			$.post('@{Application.forgetPassword()}',
			{email: email}, 
			function( user ){
				if ( user == null && email != ""){
				$.fn.colorbox.close();				
				showDialog('Error', 'The email you entered does not exist, please enter a valid one', 'error'); 
			    }
			else if( user != null && email != ""){
				$.fn.colorbox.close();	
				showDialog('Success','An email is sent to ' + email + ' containing your password','success');	
		s
			}
				
			});
	
	});		
    </script>

</html>  
  